package com.dingli.admin.service.impl;

import com.dingli.admin.service.UpdateUser;
import com.dingli.framework.entity.User;
import com.dingli.framework.mapper.UserMapper;
import com.dingli.framework.util.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.ResponseBody;

@Service
public class UpdateUserImpl implements UpdateUser {
    @Autowired
    private UserMapper userMapper;

    @Override
    public Response updateUser(User user) {
        int user1 = userMapper.updateUser(user);
        if(user1 >= 1){
            return new Response(200, "修改成功");
        }else {
            return new Response(500, "修改失败");
        }
    }
}
